import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 获取装饰件出入库
export const getDecorativePartOutIn = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/decorativePartOutIn/queryDecorativePartOutIn`, { params });

// 通过BillNo获取详细的配件情况
export const getDecorativePartInfo = params => axios.get(`${SERVER.DMSCLOUD_PART}/basedata/decorativePartOutIn/getDecorativeList/${params.billNo}`, params);

// 装饰件出库操作
export const editOutStockQuantity = params =>
  axios.get(`${SERVER.DMSCLOUD_PART}/basedata/decorativePartOutIn/editOutStockQuantity/${params.id}/${params.partNo}/${params.checkbillNo}/${params.outQuantity}/${params.outType}`, params);

// 装饰件退库操作
export const editReturnStockQuantity = params =>
  axios.get(`${SERVER.DMSCLOUD_PART}/basedata/decorativePartOutIn/editReturnStockQuantity/${params.id}/${params.partNo}/${params.checkbillNo}/${params.returnQuantity}`, params);
// 验证装饰派工数量是否正确
export const checkStockByPartNo = params => axios.get(`${SERVER.DMSCLOUD_PART}/partBoutique/decoration/checkStockByPartNo`, { params });
